A general method for computing kinetic isotope effects is described. The method uses the quantum-instanton approximation and is based on the thermodynamic integration with respect to the mass of the isotopes and on the path-integral Monte-Carlo evaluation of relevant thermodynamic quantities. The central ingredients of the method are the Monte-Carlo estimators for the logarithmic derivatives of the partition function and the delta-delta correlation function. Several alternative estimators for these quantities are described here and their merits are compared on the benchmark hydrogen-exchange reaction, H+H_2->H_2+H on the Truhlar-Kuppermann potential energy surface. Finally, a qualitative discussion of issues arising in many-dimensional systems is provided.